package com.example.main.utils;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * @NAME: WSC
 * @DATE: 2021/12/9
 **/
@Data
public class WeChatMessage extends HashMap<String, Object> {
    public static WeChatMessage generous(String msg) {
        WeChatMessage message = new WeChatMessage();
        message.put("msgtype", "text");

        Map text = new HashMap<String, Object>();
        text.put("content", msg);
        message.put("text", text);

        return message;
    }
}
